home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
MPW_TOOL
/
TOOLS
/
TOOLS_WI
/
PERL
/
UNTESTED
/
EG
/
VAN
/
VANEXP
< prev
next >
Wrap
Text File
|
1991-04-28
|
443b
|
22 lines
#!/usr/bin/perl
# $Header: vanexp,v 4.0 91/03/20 01:15:54 lwall Locked $
# This is for running from a find at night to expire old .deleteds
$can = $ARGV[0];
exit 1 unless $can =~ /.deleted$/;
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat($can);
exit 0 unless $size;
if (time - $mtime > 2 * 24 * 60 * 60) {
`/bin/rm -rf $can`;
}
else {
`find $can -ctime +2 -exec rm -f {} \;`;
}